package com.ruoyi.human.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.human.mapper.ClinicalTrialDesignMapper;
import com.ruoyi.human.domain.ClinicalTrialDesign;
import com.ruoyi.human.service.IClinicalTrialDesignService;

/**
 * 临床试验设计Service业务层处理
 * 
 * @author gw
 * @date 2025-01-06
 */
@Service
public class ClinicalTrialDesignServiceImpl implements IClinicalTrialDesignService 
{
    @Autowired
    private ClinicalTrialDesignMapper clinicalTrialDesignMapper;

    /**
     * 查询临床试验设计
     * 
     * @param designId 临床试验设计主键
     * @return 临床试验设计
     */
    @Override
    public ClinicalTrialDesign selectClinicalTrialDesignByDesignId(Long designId)
    {
        return clinicalTrialDesignMapper.selectClinicalTrialDesignByDesignId(designId);
    }

    /**
     * 查询临床试验设计列表
     * 
     * @param clinicalTrialDesign 临床试验设计
     * @return 临床试验设计
     */
    @Override
    public List<ClinicalTrialDesign> selectClinicalTrialDesignList(ClinicalTrialDesign clinicalTrialDesign)
    {
        return clinicalTrialDesignMapper.selectClinicalTrialDesignList(clinicalTrialDesign);
    }

    /**
     * 新增临床试验设计
     * 
     * @param clinicalTrialDesign 临床试验设计
     * @return 结果
     */
    @Override
    public int insertClinicalTrialDesign(ClinicalTrialDesign clinicalTrialDesign)
    {
        return clinicalTrialDesignMapper.insertClinicalTrialDesign(clinicalTrialDesign);
    }

    /**
     * 修改临床试验设计
     * 
     * @param clinicalTrialDesign 临床试验设计
     * @return 结果
     */
    @Override
    public int updateClinicalTrialDesign(ClinicalTrialDesign clinicalTrialDesign)
    {
        return clinicalTrialDesignMapper.updateClinicalTrialDesign(clinicalTrialDesign);
    }

    /**
     * 批量删除临床试验设计
     * 
     * @param designIds 需要删除的临床试验设计主键
     * @return 结果
     */
    @Override
    public int deleteClinicalTrialDesignByDesignIds(Long[] designIds)
    {
        return clinicalTrialDesignMapper.deleteClinicalTrialDesignByDesignIds(designIds);
    }

    /**
     * 删除临床试验设计信息
     * 
     * @param designId 临床试验设计主键
     * @return 结果
     */
    @Override
    public int deleteClinicalTrialDesignByDesignId(Long designId)
    {
        return clinicalTrialDesignMapper.deleteClinicalTrialDesignByDesignId(designId);
    }
}
